FROM docker.m.daocloud.io/library/golang:1.24 AS builder
LABEL authors="zyc"

WORKDIR /app
RUN go env -w  GOPROXY=https://goproxy.cn,direct
COPY . .
RUN go build -o /app/flare-admin .

FROM docker.m.daocloud.io/library/ubuntu:22.04
LABEL authors="zyc"
WORKDIR /app
COPY --from=builder /app/flare-admin /app/flare-admin
COPY application.yaml /app/application.yaml
COPY static /app/static
ENV FLARE_MODE local

EXPOSE 8800
CMD ["/app/flare-admin"]

